//
//  TypeBL.m
//  MyNotes
//
//  Created by chen on 17/4/7.
//  Copyright © 2017年 chen. All rights reserved.
//

#import "TypeBL.h"

@implementation TypeBL
-(NSMutableArray *)createType:(Type *)model{
    FMDBDao *dao = [FMDBDao shareDatabase];
    [dao insertTypeData:model];
    return [dao readTypeDataByAll];
}
-(NSMutableArray *)remove:(Type *)model{
    FMDBDao *dao = [FMDBDao shareDatabase];
    [dao deleteTypeDataByTid:model.tid];
    return [dao readTypeDataByAll];
}
-(NSMutableArray *)findAll{
    FMDBDao *dao = [FMDBDao shareDatabase];
    return [dao readTypeDataByAll];
}
@end
